import Vue from 'vue'
import Router from 'vue-router'
import Files from './views/Files.vue'
import SearchFiles from './views/SearchFiles.vue'

Vue.use(Router)

export default new Router({
  mode: 'history',
  base: process.env.BASE_URL,
  routes: [
    {
      path: '/',
      redirect: '/files/0'
    },
    {
      path: '/files/:id',
      name: 'files',
      component: Files
    },
    {
      path: '/search-files/:search',
      name: 'searchFiles',
      component: SearchFiles
    }
  ]
})
